var coords;
//点击电话拨打电话
function goTel(num) {
	//alert($(num).find(".telnum").text());
	window.location = "tel:" + $(num).find(".telnum").text();
	//alert($("#popTel").text());
}
//点击地图进入MAP
function goMap() {
	window.location = "/businessPoint/map?coords=" + coords;
	//alert($("#popMap").text());
}

function createPop(a) {
	var info = a.split(",");
	coords = info[2] + "," + info[3] + "," + info[0] + "," + info[1] + ","
			+ info[4];

	var dialog = $('<div style="padding:0px 15px;margin:0px 15px;"><table style="padding-bottom:30px;">'
			   + '<tbody>'
			   	 +' <tr>'
			        + '<td colspan="3" align="center"><h3>'
			        + info[4]
			        +'</h3></td>'
			     + '</tr>'
			     + '<tr onclick="goTel(this)">'
			     	+ '<td style="width:40px;padding-bottom:8px;line-height:30px;">电话:</td>'
			        + '<td style="align:left;padding-bottom:8px;line-height:30px;" class="telnum">'
			        + info[0]
			        + '</td>'
			        + '<td  style="margin-left:10px;padding-bottom:8px;"><img src="../../static/images/default/tel.png"/></td>'
			     + '</tr>'
			     + '<tr onclick="goMap()">'
			     	+ '<td  style="width:40px;padding-top:8px;line-height:30px;">地址:</td>'
			        + '<td  style="align:left;padding-top:8px;line-height:30px;">'
			        + info[1]
			        + '</td>'
			        + '<td  style="margin-left:10px;padding-top:8px;"><img src="../../static/images/default/map.png"></td>'
			     + '</tr>'
			     + '</tbody>'
			     + '</table></div>');
	
	$.mobile.activePage.append(dialog);
	dialog.trigger('create').trigger('refresh').popup();
	dialog.popup('open');
}